home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / obsolete / pairwise.pro < prev    next >
Text File  |  1997-07-08  |  854b  |  34 lines

  1. ; $Id: pairwise.pro,v 1.2 1997/01/15 04:02:19 ali Exp $
  2. ;
  3. ;  Copyright (c) 1991-1997, Research Systems Inc.  All rights
  4. ;  reserved. Unauthorized reproduction prohibited.
  5.  
  6.  
  7.  Pro Pairwise,X,Missing,YR,YC, NotGood1, good
  8.  ;On return,  YR(i) = the number of entries in the ith row of the two
  9.  ; dimensional array X that are unequal to Missing. YC= analoque of YR
  10.  ; for rows. Also, all occurences of Missinig in X will be changed to 0.
  11.  ; Pairwise is intended to handle missing data.
  12.  
  13.    
  14.   S=Size(X)
  15.   C=S(1)
  16.   R=S(2)
  17.  
  18.  A=X
  19.  NotGood = where(A eq Missing, count)
  20.  Good = where(A ne Missing, count1)
  21.  
  22.  if count ne 0 THEN BEGIN
  23.   if count1 ne 0 THEN A(Good) =1
  24.   A(NotGood)  =0
  25.   YR=REplicate(1,C) # A
  26.   YC= A# replicate(1,R)
  27.   X(where(X EQ Missing))=0
  28.   notgood1 = notgood
  29.  ENDIF ELSE BEGIN
  30.    YR = replicate(C,R)
  31.    YC = replicate(R,C)
  32.  ENDELSE
  33.  return
  34.  end